<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title><?php echo $template['title'] ?></title>
<meta name="keywords" content="前台界面" />
<meta name="description" content="前台界面" />
<?php
foreach ($template['css'] as $var) {
	echo "<link rel='stylesheet' type='text/css' href='{$var}' />";
}
?>
</head>
<body>
<main>
<!--回到顶部-->
<a href=""><div class="top">top</div></a>
<!--头部-->
<header>
	<div class="g">
		<div class="g1">清&nbsp;&nbsp;梦</div>
		<div class="g2">www.yating.com</div>
	</div>
	<div class="y">
		<div class="y1">葛雅婷个人网站——清梦博客</div>
		<div class="y2">每个作品都有自己的灵魂，只要灵魂发挥极致，那么成功就在眼前...</div>
	</div>
</header>
<!--导航-->
<nav>
	<div class="logo">
		<ul>
			<li><a href="index.php">网站首页</a></li>
			<li><a href="me.php">关于我</a></li>
			<li><a href="words.php">碎言碎语</a></li>
			<li><a href="note.php">学习笔记</a></li>
			<li><a href="life.php">慢生活</a></li>
			<li><a href="link.php">友情链接</a></li>
			<li><a href="show.php">留言板</a></li>
		</ul>
	</div>
	<div class="login">
				<?php 
				if(isset($user_id) && $user_id){
$str=<<<A
				<a href="user.php?id={$user_id}" target="_blank">您好！{$_COOKIE['blog']['name']}</a> 
				<a href="logout.php">|&nbsp;退出</a>
A;
				echo $str;
				}else{
$str=<<<A
				<a href="login.php">登录</a>
				<a href="register.php">注册</a>
A;
				echo $str;
				}
				?>				
	</div>
	<div class="sub" onclick="disDiv()" >
		<p></p>
	</div>
</nav>
<!--搜索-->
<div id="search">
	<form>
		<input class="keyword" type="text" name="keyword" placeholder="搜索其实很简单" />
		<input class="submit" type="submit" name="submit" value="搜索" />
	</form>
</div>
<script type="text/javascript">
	//点击鼠标显示搜索
    function disDiv(){
		var d=document.getElementById("search");
		if(d.style.display="none"){
			d.style.display="block";
		}
	}
</script>